package org.example.javadt.entity;

public class post_tags {
    private String post_id;
    private int tag_id;
    private posts posts;
    private tags tags;
    private comments comments;
//    存储数据：
//
//    post_id：帖子 ID（关联 posts 表）
//    tag_id：标签 ID（关联 tags 表）
//
//    用途：
//    建立帖子和标签的多对多关联关系，一个帖子可以有多个标签，一个标签可以被多个帖子使用。


    public String getPost_id() {
        return post_id;
    }

    public void setPost_id(String post_id) {
        this.post_id = post_id;
    }

    public int getTag_id() {
        return tag_id;
    }

    public void setTag_id(int tag_id) {
        this.tag_id = tag_id;
    }

    public org.example.javadt.entity.posts getPosts() {
        return posts;
    }

    public void setPosts(org.example.javadt.entity.posts posts) {
        this.posts = posts;
    }

    public org.example.javadt.entity.tags getTags() {
        return tags;
    }

    public void setTags(org.example.javadt.entity.tags tags) {
        this.tags = tags;
    }

    public org.example.javadt.entity.comments getComments() {
        return comments;
    }

    public void setComments(org.example.javadt.entity.comments comments) {
        this.comments = comments;
    }

    public post_tags() {
    }

    public post_tags(String post_id, int tag_id, org.example.javadt.entity.posts posts, org.example.javadt.entity.tags tags, org.example.javadt.entity.comments comments) {
        this.post_id = post_id;
        this.tag_id = tag_id;
        this.posts = posts;
        this.tags = tags;
        this.comments = comments;
    }

    @Override
    public String toString() {
        return "post_tags{" +
                "post_id='" + post_id + '\'' +
                ", tag_id=" + tag_id +
                ", posts=" + posts +
                ", tags=" + tags +
                ", comments=" + comments +
                '}';
    }
}
